package top.infopub.enums.mkt;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public enum RecycleTypeEnum {
    INQ_TYPE0("1", "现金"),
    INQ_TYPE1("2", "其他");

    private String code;

    private String name;

    RecycleTypeEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public static List<Map<String, String>> asList() {
        List<Map<String, String>> list = new ArrayList<>();
        Map<String, String> map;
        for (RecycleTypeEnum rte : RecycleTypeEnum.values()) {
            map = new HashMap<>();
            map.put("code", rte.getCode());
            map.put("name", rte.getName());
            list.add(map);
        }
        return list;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
